package edu.upol.paradise.compiler.types;

import org.apache.log4j.Logger;

public class ParadiseString implements ParadiseObject {
	static final Logger log = Logger.getLogger(ParadiseString.class);

	private String value;
	
	public ParadiseString(String value){
		this.value = value;
	}
	
	public boolean isTrue() {
		return true;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public String toString(){
		return value;
	}

	public boolean isAtom() {
		return true;
	}
	
	public boolean valueEquals(ParadiseObject other) {
		if (other instanceof ParadiseString && ((ParadiseString)other).value.equals(value))
			return true;
		return false;
	}
	
	public int atomHashId() {
		return value.hashCode();
	}
}
